<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>参数传递</title>
</head>
<body>
<div id="app">
    {{msg}}
  <p>
    <button @click="change('hello vue')">确认</button>
  </p>
</div>
</body>
</html>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el: '#app',
        data: {
          msg: 'hello world'
        },
        methods: {
            change(msg){
                this.msg = msg
            }
        }
    });
</script>